package com.zjmzxfzhl.modules.purchase.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zjmzxfzhl.common.base.BaseService;
import com.zjmzxfzhl.modules.purchase.controller.dto.PurchasePaymentQueryDto;
import com.zjmzxfzhl.modules.purchase.entity.PurchasePayment;
import com.zjmzxfzhl.modules.purchase.entity.PurchasePaymentModel;

import java.util.List;

/**
 * Service
 *
 * @author 庄金明
 */
public interface PurchasePaymentService extends BaseService<PurchasePayment> {
    /**
     * 分页查询
     *
     * @param page
     * @param purchasePayment
     * @return
     */
    IPage<PurchasePayment> list(IPage<PurchasePayment> page, PurchasePayment purchasePayment);

    /**
     * 删除合同付款情况
     * @param contractId
     */
    void deleteByContractId(Long contractId);

    /**
     * 合同付款情况-合并输出
     * @param contractId
     * @return
     */
    String mergePaymentSituation(Long contractId);

    /**
     * 合同付款情况-合并输出
     * @param purchasePayments
     * @return
     */
    String mergePaymentSituation(List<PurchasePayment> purchasePayments);

    /**
     * 查询合同下的付款情况
     * @param contractId
     * @return
     */
    List<PurchasePayment> listByContractId(Long contractId);

    /**
     * 条件查询
     * @param queryDto
     * @return
     */
    List<PurchasePaymentModel> listBy(PurchasePaymentQueryDto queryDto);

}
